a + b + c + d = n

 
Numbers to 12
Row and column totals are red
Diagonal total is green